<?php
   require_once('system/dbConnect.php');
   require_once('system/MyFunc.php');   
   connect();
  $sql = "select * from videotype";
      if($_POST)
  {
    $key = $_POST['key'];
    $sql = $sql." where typename like '%{$key}%' ";
  }
  $result = fetch_array($sql);    
 ?>
 <table align="center" width="80%" border=1> 
 <tr>
   <th>视频类别编号</th>
   <th>视频类别名称</th>   
 </tr>
<?php
foreach ($result as $one ) 
 {
   echo '<tr>';
   echo '<td>'.$one['tid'].'</td>';
   echo '<td>'.$one['typename'].'</td>';  
  }
  echo '</table>';  
?>